package com.example.order.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Http请求调用配置
 * @author: 不是菜狗爱编程
 * @date: 2024/04/04/8:40
 * @description:
 */
@Configuration
public class HttpConfig {
    /**
     * 创建RestTemplate并注入spring容器
     *
     * @return {@link RestTemplate}
     */
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
